package com.md.api.dao;

import com.md.api.entity.SiteServicePredetermineDetail;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface SiteServicePredetermineDetailMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(SiteServicePredetermineDetail record);

    SiteServicePredetermineDetail selectByPrimaryKey(Integer id);

    List<SiteServicePredetermineDetail> predetermineList();

    int updateByDetailId(SiteServicePredetermineDetail record);

    int updatePredetermineStatus(SiteServicePredetermineDetail detail);

    List<SiteServicePredetermineDetail> getByServiceId(@Param("serviceId") String serviceId);

    SiteServicePredetermineDetail hasPredetermined(@Param("userId")String userId, @Param("serviceId")String serviceId, @Param("predetermineDate")Date predetermineDate);

    List<SiteServicePredetermineDetail> getByUserId(@Param("userId")String userId);

    SiteServicePredetermineDetail getByDetailId(@Param("detailId") String detailId);
}